<%--
  Created by IntelliJ IDEA.
  User: hiugiak
  Date: 2018/11/10
  Time: 4:41 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>毕业设计指导网站</title>
    <jsp:include page="../includes/framework-headers.jsp" />
    <c:choose>
        <c:when test="${sessionScope.user.getUserType() == 'A'}">
            <jsp:include page="../includes/framework-navbar-admin.jsp" />
        </c:when>
        <c:when test="${sessionScope.user.getUserType() == 'S'}">
            <jsp:include page="../includes/framework-navbar-student.jsp" />
        </c:when>
        <c:when test="${sessionScope.user.getUserType() == 'T'}">
            <jsp:include page="../includes/framework-navbar-teacher.jsp" />
        </c:when>
    </c:choose>

    <script src="${pageContext.request.contextPath}/js/shared/bulletin_board.js"></script>
</head>
<body>
<div class="gpg-middle">
    <div class="uk-container uk-container-center">
        <div class="uk-grid" data-uk-grid-margin>
            <c:choose>
                <c:when test="${sessionScope.user.getUserType() == 'A'}">
                    <jsp:include page="../includes/framework-nav-panel-admin.jsp" />
                </c:when>
                <c:when test="${sessionScope.user.getUserType() == 'S'}">
                    <jsp:include page="../includes/framework-nav-panel-student.jsp" />
                </c:when>
                <c:when test="${sessionScope.user.getUserType() == 'T'}">
                    <jsp:include page="../includes/framework-nav-panel-teacher.jsp" />
                </c:when>
            </c:choose>
            <div class="uk-width-medium-3-4">
                <div id="dialog_bulletin" class="uk-modal">
                    <div class="uk-modal-dialog">
                        <a class="uk-modal-close uk-close"></a>
                        <h1 class="uk-text-center"></h1>
                        <p class="uk-text-center uk-text-muted"></p>
                        <p></p>
                    </div>
                </div>
                <!-- 主体内容 -->
                <article class="uk-article">
                    <div class="uk-panel uk-panel-box uk-panel-box-secondary">
                        <h3 class="uk-panel-title uk-text-center">公告</h3>
                        <table class="uk-table uk-table-condensed">
                            <tbody>
                            <c:forEach var="bulletin" items="${bulletins}">
                                <tr>
                                    <td hidden>${bulletin.bulletinId}</td>
                                    <td class="uk-width-4-5">
                                        <button class="uk-button uk-button-link uk-text-truncate btn-check-bulletin">${bulletin.title}</button>
                                    </td>
                                    <td class="uk-text-center uk-text-muted uk-width-1-5" style="vertical-align: middle; font-size: 14px">
                                        <fmt:formatDate value="${bulletin.releaseTime}" pattern="yyyy-MM-dd" />
                                    </td>
                                </tr>
                            </c:forEach>
                            </tbody>
                        </table>
                    </div>
                </article>
            </div>
        </div>
    </div>
</div>
</body>
</html>
